package orm

import "fmt"

type Query struct {
	cond string
	order string
	limit string
	argv []interface{}
}

func (q *Query) Where(cond string, argv ...interface{}) {
	cond, argv = ReplacePlaceHolder(cond, argv...)
	q.cond = cond
	q.argv = append(q.argv, argv...)
}

func (q *Query) Order(by string, argv ...interface{}) {
	q.order = by
	q.argv = append(q.argv, argv...)
}

func (q *Query) Limit(offset, length int) {
	q.limit = fmt.Sprintf("%d, %d", offset, length)
}

func (q *Query) Page(no, size int) {

}

func (q *Query) Build() string {
	return ""
}